Optimal. Leaf size=169 \[ -\frac {\sqrt {i a-b} (i A-B) \text {ArcTan}\left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {2 \sqrt {b} B \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}-\frac {\sqrt {i a+b} (i A+B) \tanh ^{-1}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.42, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps
used = 12, number of rules used = 9, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.257, Rules used = {3695, 3697,
3696, 95, 209, 212, 3715, 65, 223} \begin {gather*} -\frac {\sqrt {-b+i a} (-B+i A) \text {ArcTan}\left (\frac {\sqrt {-b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}-\frac {\sqrt {b+i a} (B+i A) \tanh ^{-1}\left (\frac {\sqrt {b+i a} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {2 \sqrt {b} B \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 95
Rule 209
Rule 212
Rule 223
Rule 3695
Rule 3696
Rule 3697
Rule 3715
Rubi steps
\begin {align*} \int \frac {\sqrt {a+b \tan (c+d x)} (A+B \tan (c+d x))}{\sqrt {\tan (c+d x)}} \, dx &=(b B) \int \frac {1+\tan ^2(c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\int \frac {a A-b B+(A b+a B) \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx\\ &=\frac {1}{2} ((a-i b) (A-i B)) \int \frac {1+i \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} ((a+i b) (A+i B)) \int \frac {1-i \tan (c+d x)}{\sqrt {\tan (c+d x)} \sqrt {a+b \tan (c+d x)}} \, dx+\frac {(b B) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {((a-i b) (A-i B)) \text {Subst}\left (\int \frac {1}{(1-i x) \sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {((a+i b) (A+i B)) \text {Subst}\left (\int \frac {1}{(1+i x) \sqrt {x} \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {(2 b B) \text {Subst}\left (\int \frac {1}{\sqrt {a+b x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{d}\\ &=\frac {((a-i b) (A-i B)) \text {Subst}\left (\int \frac {1}{1-(i a+b) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {((a+i b) (A+i B)) \text {Subst}\left (\int \frac {1}{1-(-i a+b) x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {(2 b B) \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}\\ &=-\frac {\sqrt {i a-b} (i A-B) \tan ^{-1}\left (\frac {\sqrt {i a-b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}+\frac {2 \sqrt {b} B \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}-\frac {\sqrt {i a+b} (i A+B) \tanh ^{-1}\left (\frac {\sqrt {i a+b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.56, size = 204, normalized size = 1.21 \begin {gather*} \frac {\sqrt [4]{-1} \left (\sqrt {-a+i b} (i A+B) \text {ArcTan}\left (\frac {\sqrt [4]{-1} \sqrt {-a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )+\sqrt {a+i b} (-i A+B) \text {ArcTan}\left (\frac {\sqrt [4]{-1} \sqrt {a+i b} \sqrt {\tan (c+d x)}}{\sqrt {a+b \tan (c+d x)}}\right )\right )+\frac {2 \sqrt {a} \sqrt {b} B \sinh ^{-1}\left (\frac {\sqrt {b} \sqrt {\tan (c+d x)}}{\sqrt {a}}\right ) \sqrt {1+\frac {b \tan (c+d x)}{a}}}{\sqrt {a+b \tan (c+d x)}}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] result has leaf size over 500,000. Avoiding possible recursion issues.
time = 0.78, size = 2175963, normalized size = 12875.52 \[\text {output too large to display}\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \sqrt {a + b \tan {\left (c + d x \right )}}}{\sqrt {\tan {\left (c + d x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 17.99, size = 1141, normalized size = 6.75 \begin {gather*} \mathrm {atanh}\left (\frac {a^{3/2}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-A^4\,a^2\,d^4}-A^2\,b\,d^2}{d^4}}\,\sqrt {-A^4\,a^2\,d^4}-a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-A^4\,a^2\,d^4}-A^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-A^4\,a^2\,d^4}+A^2\,a^{3/2}\,b\,d^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-A^4\,a^2\,d^4}-A^2\,b\,d^2}{d^4}}-A^2\,a\,b\,d^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-A^4\,a^2\,d^4}-A^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{A^3\,a^3\,d^2-A\,a\,b\,\sqrt {-A^4\,a^2\,d^4}-A\,b^2\,\mathrm {tan}\left (c+d\,x\right )\,\sqrt {-A^4\,a^2\,d^4}-A^3\,a^{5/2}\,d^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+A^3\,a^2\,b\,d^2\,\mathrm {tan}\left (c+d\,x\right )+A\,\sqrt {a}\,b\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-A^4\,a^2\,d^4}}\right )\,\sqrt {\frac {\sqrt {-A^4\,a^2\,d^4}-A^2\,b\,d^2}{d^4}}-\mathrm {atanh}\left (\frac {a^{3/2}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-A^4\,a^2\,d^4}+A^2\,b\,d^2}{d^4}}\,\sqrt {-A^4\,a^2\,d^4}-a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-A^4\,a^2\,d^4}+A^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-A^4\,a^2\,d^4}-A^2\,a^{3/2}\,b\,d^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-A^4\,a^2\,d^4}+A^2\,b\,d^2}{d^4}}+A^2\,a\,b\,d^3\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-A^4\,a^2\,d^4}+A^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{A^3\,a^3\,d^2+A\,a\,b\,\sqrt {-A^4\,a^2\,d^4}+A\,b^2\,\mathrm {tan}\left (c+d\,x\right )\,\sqrt {-A^4\,a^2\,d^4}-A^3\,a^{5/2}\,d^2\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}+A^3\,a^2\,b\,d^2\,\mathrm {tan}\left (c+d\,x\right )-A\,\sqrt {a}\,b\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-A^4\,a^2\,d^4}}\right )\,\sqrt {-\frac {\sqrt {-A^4\,a^2\,d^4}+A^2\,b\,d^2}{d^4}}+\mathrm {atanh}\left (\frac {2\,\left (\frac {\sqrt {a}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-B^4\,a^2\,d^4}+B^2\,b\,d^2}{d^4}}}{2}-\frac {d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {\sqrt {-B^4\,a^2\,d^4}+B^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{2}\right )}{B\,\left (a+b\,\mathrm {tan}\left (c+d\,x\right )-\sqrt {a}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\right )}\right )\,\sqrt {\frac {\sqrt {-B^4\,a^2\,d^4}+B^2\,b\,d^2}{d^4}}+\mathrm {atanh}\left (\frac {2\,\left (\frac {\sqrt {a}\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-B^4\,a^2\,d^4}-B^2\,b\,d^2}{d^4}}}{2}-\frac {d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {\sqrt {-B^4\,a^2\,d^4}-B^2\,b\,d^2}{d^4}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{2}\right )}{B\,\left (a+b\,\mathrm {tan}\left (c+d\,x\right )-\sqrt {a}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\right )}\right )\,\sqrt {-\frac {\sqrt {-B^4\,a^2\,d^4}-B^2\,b\,d^2}{d^4}}+\frac {4\,B\,\sqrt {b}\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}}{\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}-\sqrt {a}}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________